home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 6 / MacMania 6.toast / / Multimedia & Desktop / sk8 / SK8InJava / Code / Actors / Oval.java < prev    next >
Encoding:
Java Source  |  1997-02-27  |  714 b   |  29 lines  |  [TEXT/CWIE]

  1. /*  SK8 © 1997 Apple Computer, Inc.
  2.     This code is protected under the current SK8 License
  3.     See http://sk8.research.apple.com/ for more information
  4.     Apple Research Laboratories
  5. */
  6.  
  7. import java.awt.*;
  8.  
  9. class oval extends actor {
  10.  
  11.     public Region boundsregion() {
  12.         Region reg = new Region();
  13.         Rectangle myBR = boundsrect(true);
  14.         reg.setOvalRegion(myBR.x, myBR.y, myBR.width, myBR.height);
  15.         return reg;
  16.     }
  17.     
  18.     public Region fillregion() {
  19.         Region reg = new Region();
  20.         Rectangle myBR = boundsrect(true);
  21.         myBR.x += framesizeVar;
  22.         myBR.y += framesizeVar;
  23.         myBR.width -= 2 * framesizeVar;
  24.         myBR.height -= 2 * framesizeVar;
  25.         reg.setOvalRegion(myBR.x, myBR.y, myBR.width, myBR.height);
  26.         return reg;
  27.     }
  28.  
  29. }